Server virtualization can be used to partition a single physical server into several virtual servers, wherein each virtual server can run its own operating system (OS) and set of applications. The software responsible for managing the virtual servers is generally referred to as a hypervisor. A system administrator can configure the hypervisor to give each virtual server its own share of the physical resources, such as RAM or CPU time. In this manner multiple copies of an operating system think they are each running on their own server, when in reality they are sharing one physical server. An operating system running within a hypervisor is generally referred to as a guest to the hypervisor.
One of the primary uses for virtualization technology is to improve server utilization. A server application running alone on a server seldom makes full use of the server. For example, if two applications that each use 40% of a server capacity could be run on the same server, then only one physical server would be needed instead of two physical servers, with a corresponding reduction of energy consumption and space requirements.
Server virtualization is not needed to aggregate several applications on the same server, so long as the applications all require the same operating system and libraries. Unfortunately, many legacy server applications require different operating systems, or different versions thereof. In these instances the only way to run several of these legacy server applications on the same server is to use a hypervisor to perform server virtualization. In some instances the hypervisor can also provide services that are not normally available in operating systems, such as guaranteeing that a certain amount of the server resources are available to one guest, but not to another less privileged guest. With several physical servers, each running a hypervisor, the hypervisor on one server can move a guest to another server. This can be used to accommodate changes in application workload or necessary upgrades or repairs of servers. Examples of server virtualization technology currently available include VMWare and XenSource.
Since an idling server often uses almost as much energy as a working server (in contrast to, for example, laptops which try to save energy due to battery considerations) aggregating guests can provide substantial energy and space savings, which immediately translates into lower costs. Therefore a common project in many information technology or IT departments is data center consolidation. Data center consolidation is also driven by necessity, for example it is often not possible to add more power to the computer center or there is no more available server space. However in the long term perspective putting old applications and operating systems onto modern hardware using hypervisors is probably not an efficient solution. More intelligent applications that cooperate with the underlying operating system and the hypervisor are needed to fully exploit the data center resources in the future.
In contrast to virtual servers which emulate an already existing hardware design, virtual machines are abstract computers for which application software can be compiled. The virtual machine is thus an abstraction level for application software that is consistent between different hardware and operating system combinations. Most of the complexity in running the same application on different platforms is handled by the virtual machine, and therefore the virtual machine becomes a very complex piece of software. Modern virtual machines need to manage code generation for the particular processor, operating system dependent resources such as threads, networking and file system. The virtual machine also manages the heap, within which allocation and freeing of virtual machine objects is performed. Examples of virtual machines include the Java Virtual Machine (JVM) and implementations thereof, including the JRockit JVM, and the Hotspot JVM. A large portion of today's server applications are written in Java and are executed on such virtual machines. The current trend with data center consolidation requires virtual machines to behave well when run as hypervisor guests, and contribute to the resource savings effort.